package com.zengqingfa.exercise.jvm;

/**
 * @author zengqingfa
 * @className ThreeColorRemark
 * @description
 * @create 2021/11/7 21:39
 */
public class ThreeColorRemark {

    public static void main(String[] args) {
        A a = new A();
        //开始做并发标记
        D d = a.b.d;// 1.读
        a.b.d = null; // 2.写
        a.d = d; // 3.写
    }
}

class A {
    B b = new B();
    D d = null;
}

class B {
    C c = new C();
    D d = new D();
}

class C {

}

class D {

}